<script setup>

import {reactive} from 'vue';

let nameArray = reactive(["aaa", "bbb", "ccc"])
let changeName = () => {
  nameArray.push("ddd");
};
</script>

<template>
  <div>
    <ul>
      <li v-for="(item, index) in nameArray" :key="index">{{ item }}--{{ index }}</li>
      <button value="点击" @click="changeName">点击</button>
    </ul>
  </div>

</template>

<style scoped>

</style>
